Ecuador Land Finder

Visualization of the area of interest

library(sf)
library(tmap)
library(mapview)

Introduction

Let us first show the area of interest. We show it at the four available levels: country, province, canton, and parish. The data is from the GADM project, which provides high-resolution maps of administrative areas worldwide.

# read the files
gadm41_ECU_country <- readRDS("clean_data/gadm41_ECU_country_custom.rds")
gadm41_ECU_provinces <- readRDS("clean_data/gadm41_ECU_province_custom.rds")
gadm41_ECU_cantons <- readRDS("clean_data/gadm41_ECU_canton_custom.rds")
gadm41_ECU_parishes <- readRDS("clean_data/gadm41_ECU_parish_custom.rds")
# set mapview options
mapviewOptions(basemaps = c("OpenStreetMap",
                            "Esri.WorldImagery",
                            "OpenTopoMap"))

Visualization of the area of interest

We choose the following polygon to delimit the area of interest. The polygon is defined by the coordinates of the four corners: Northeast, Southeast, Southwest, and Northwest.

NE <- c(-78.86238, 0.04550)
SE <- c(-79.52285, -1.11994)
SW <- c(-80.96772, -1.10722)
NW <- c(-80.06668, 0.50266)
coords <- rbind(NE, SE, SW, NW, NE)
crop_polygon <- st_polygon(list(coords)) %>% 
  st_sfc(crs = st_crs(gadm41_ECU_country)) # match CRS of your data
crop_polygon_sf <- st_sf(geom = crop_polygon)
mapview::mapview(crop_polygon_sf,
                 alpha.regions = 0.4,    # fill transparency
                 color = "black",        # border color
                 alpha = 1,            # border transparency
                 legend = FALSE)
Figure 1: This shows the polygon that delimits the area of interest. Click on the region to see more details.

At the country level

mapview(
  gadm41_ECU_country,
  zcol = "COUNTRY",        # attribute used for fill
  alpha.regions = 0.4,    # fill transparency
  color = "black",        # border color
  alpha = 1,            # border transparency
  legend = FALSE           # remove legend
)
Figure 2: This shows the region of interest at the country level. Click on the region to see more details.

At the province level

mapview(
  gadm41_ECU_provinces,
  zcol = "NAME_1",        # attribute used for fill
  alpha.regions = 0.4,    # fill transparency
  color = "black",        # border color
  alpha = 1,            # border transparency
  legend = FALSE           # remove legend
)
Figure 3: This shows the region of interest at the province level. Click on the region to see more details.

At the canton level

mapview(
  gadm41_ECU_cantons,
  zcol = "NAME_2",        # attribute used for fill
  alpha.regions = 0.4,    # fill transparency
  color = "black",        # border color
  alpha = 1,            # border transparency
  legend = FALSE           # remove legend
)
Figure 4: This shows the region of interest at the canton level. Click on the region to see more details.

At the parish level

mapview(
  gadm41_ECU_parishes,
  zcol = "NAME_3",        # attribute used for fill
  alpha.regions = 0.4,    # fill transparency
  color = "black",        # border color
  alpha = 1,            # border transparency
  legend = FALSE           # remove legend
)
Figure 5: This shows the region of interest at the parish level. Click on the region to see more details.